#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time    : 2022/10/24 8:23
# @Author  : Junzhao
# @File    : 学生.py
# @Software: PyCharm
import pickle


class Student(object):
    def __int__(self):
        pass

    def __init__(self, id: int, name: str, english_score: float, python_score: float, java_score: float):
        self.id = id
        self.name = name
        self.english_score = english_score
        self.python_score = python_score
        self.java_score = java_score
        pass

    def show(self):
        print("学生id：%d\n"
              "学生姓名：%s\n"
              "英语成绩：%r\n"
              "Python成绩：%r\n"
              "Java成绩：%r\n" % (self.id, self.name.strip(''), self.english_score, self.python_score, self.java_score))
        # print(f"学生id：{self.id}\n"
        #       f"学生姓名：{self.name.strip('')}\n"
        #       f"英语成绩：{self.english_score}\n"
        #       f"Python成绩：{self.python_score}\n"
        #       f"Java成绩：{self.java_score}\n")
        pass


# if __name__ == "__main__":
#     s1 = Student(11111, "asd", 123, 123, 132)
#     s2 = Student(12345, "sdf", 123, 123, 132)
#     with open('SMS.pkl', 'wb') as f:
#         pickle.dump([s1, s2], f)
#         f.close()
#
#     with open('SMS.pkl', 'rb') as f:
#         students = pickle.load(f)
#         for student in students:
#             student.show()
#
#         f.close()
#     # s.show()
